/**
 * 
 */
package br.com.ctm.advogadope.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

import br.com.framework.persistencia.model.BaseEntity;

/**
 * @author ctm
 *
 */
@Entity
@Table(name = "NOTIFICACAO")
@XmlRootElement
public class Notificacao extends BaseEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String descricao;
	private Processo processo;
	private Date dataNotificacao;

	/**
	 * 
	 */
	public Notificacao() {
		// TODO Auto-generated constructor stub
	}
	
	@Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator="SEQ_NOTIFICACAO")
	@SequenceGenerator(name="SEQ_NOTIFICACAO", sequenceName="SEQ_NOTIFICACAO", allocationSize=1, initialValue=0)
	@Column(name = "ID_NOTIFICACAO")
	public Long getId() {
		return super.getId();
	}

	/**
	 * @return the descricao
	 */
	public String getDescricao() {
		return descricao;
	}

	/**
	 * @param descricao the descricao to set
	 */
	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	/**
	 * @return the dataNotificacao
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DATA_NOTIFICACAO", nullable = false)
	public Date getDataNotificacao() {
		return dataNotificacao;
	}

	/**
	 * @param dataNotificacao the dataNotificacao to set
	 */
	public void setDataNotificacao(Date dataNotificacao) {
		this.dataNotificacao = dataNotificacao;
	}

	/**
	 * @return the processo
	 */
	@ManyToOne(targetEntity = Processo.class)
	@JoinColumn(name="ID_PROCESSO", nullable = false)
	public Processo getProcesso() {
		return processo;
	}

	/**
	 * @param processo the processo to set
	 */
	public void setProcesso(Processo processo) {
		this.processo = processo;
	}

}
